/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ronsicecream.pos.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author user
 */
@Entity
@Table(name = "pos_master_rasa")
@XmlRootElement
//@NamedQueries({
//    @NamedQuery(name = "PosMasterRasa.findAll", query = "SELECT p FROM PosMasterRasa p"),
//    @NamedQuery(name = "PosMasterRasa.findBySync", query = "SELECT p FROM PosMasterRasa p WHERE p.sync = :sync"),
//    @NamedQuery(name = "PosMasterRasa.findBySatuanId", query = "SELECT p FROM PosMasterRasa p WHERE p.satuanId = :satuanId"),
//    @NamedQuery(name = "PosMasterRasa.findBySatuanCode", query = "SELECT p FROM PosMasterRasa p WHERE p.satuanCode = :satuanCode"),
//    @NamedQuery(name = "PosMasterRasa.findBySatuanName", query = "SELECT p FROM PosMasterRasa p WHERE p.satuanName = :satuanName")})
public class PosMasterRasa implements Serializable {
    private static final long serialVersionUID = 1L;
    @Column(name = "sync")
    private String sync;
    @Id
    @Basic(optional = false)
    @Column(name = "rasa_id")
    private Integer rasaId;
    @Column(name = "rasa_code")
    private String rasaCode;
    @Column(name = "rasa_name")
    private String rasaName;

    public PosMasterRasa() {
    }

    public PosMasterRasa(Integer rasaId) {
        this.rasaId = rasaId;
    }

    public String getSync() {
        return sync;
    }

    public void setSync(String sync) {
        this.sync = sync;
    }

    public Integer getRasaId() {
        return rasaId;
    }

    public void setRasaId(Integer rasaId) {
        this.rasaId = rasaId;
    }

    public String getRasaCode() {
        return rasaCode;
    }

    public void setRasaCode(String rasaCode) {
        this.rasaCode = rasaCode;
    }

    public String getRasaName() {
        return rasaName;
    }

    public void setRasaName(String rasaName) {
        this.rasaName = rasaName;
    }

   

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (rasaId != null ? rasaId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof PosMasterRasa)) {
            return false;
        }
        PosMasterRasa other = (PosMasterRasa) object;
        if ((this.rasaId == null && other.rasaId != null) || (this.rasaId != null && !this.rasaId.equals(other.rasaId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return rasaName;
//        return "com.ronsicecream.pos.entities.PosMasterRasa[ satuanId=" + rasaId + " ]";
    }
    
}
